package com.wkbb.common.enums;

/**
 * sql脚本,清除项
 */
public enum DeleteItemEnum {

    IM("IM","清除IM相关数据",1),
    FACE("FACE","清除人脸相关数据",2),
    ORDER("ORDER","清除订单相关数据",3),
    VIDEO("VIDEO","清除视频相关数据",4),
    USER("USER","清除用户基础信息相关(老师,家长,学生,任课老师,IM相关)数据",5),
    CLASS("CLASS","清除班级数据",6),
    ORGANIZATION("ORGANIZATION","清除学校数据",7),
    ACCOUNT("ACCOUNT","清除账户数据",8);

    private DeleteItemEnum(String value, String desc,Integer sort) {
        this.value = value;
        this.desc = desc;
        this.sort = sort;
    }

    private String value;

    private String desc;

    private Integer sort;

    public String getValue() {
        return this.value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public String getDesc() {
        return this.desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public Integer getSort() {
        return this.sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }

    public static String getDesc(String value) {
        for (DeleteItemEnum deleteItemEnum : DeleteItemEnum.values()) {
            if (deleteItemEnum.getValue().equals(value)) {
                return deleteItemEnum.getDesc();
            }
        }
        return null;
    }

    public static DeleteItemEnum getById(String value){
        for(DeleteItemEnum item : values()){
            if (item.getValue().equals(value)) {
                //获取指定的枚举
                return item;
            }
        }
        return null;
    }
}
